#include <iostream>
#include <vector>
using namespace std;

int main() {

	string str;
	cin>>str;
	int n=str.size();
	vector<bool> vecFlg(11);
	int idx=n-1;
	while(idx>=0 && str[idx]=='0'){
		--idx;
	}
	for(int i=idx;i>=0;--i){
		if(vecFlg[str[i]-'0']){
			continue;
		}
		vecFlg[str[i]-'0']=true;
		cout<<str[i];
	}
	
	return 0;
}
